Fix flicker issue on re-render in web implementation of Slider component#603
Fix flicker issue on re-render in web implementation of Slider component#603landabaso wants to merge 2 commits intocallstack:mainfrom
Conversation
- Updated `sliderStyle` to conditionally set width only when it's not zero to prevent initial flicker during re-renders. - This change ensures a smoother user experience by eliminating flicker effects when the component re-renders.
|
Oups, one of the tests failed (due to a snapshot comparison). Please let me know if you agree with this PR approach, and I'll update the snapshot accordingly. |
|
In fact, I am still experiencing flicker issues on iOS and Android. Not setting the width at all (as it was originally) solves the flicker. That is: Could you provide some insights on why the width was added, @BartoszKlonowski? This was introduced in PR #555. Setting styles in Thanks! |
|
I would like to get more attention to this PR. I just recently turned on the the new arch had quite a lot of flickering issues from this slider library. Removing the width as @landabaso suggests solved the issues completely while, as far as I can tell, leave everything else still working. I am currently using a patch in order to fix my flickering issues. Removing the |
Description
This PR addresses an issue with the
Slidercomponent where a flicker effect is visible during re-renders, specifically in the web implementation. The flicker was caused by the width being reset during the layout calculation.Changes Made
sliderStyleto set thewidthonly if it is not zero using the conditional spread operator.